/** \brief File implementing adapter functions for multithreading.
 *
 * This file contains the implementation of helper functions to use together
 * with QtConcurent.
 *
 * @file Worker.cpp
 * @author Johan "Solo" Luisier
 * @date 2013/03/22
 */
#include "Worker.hpp"

#include "Cell.hpp"

#include <QtCore/QDebug>

namespace Worker
{
    void getFutureStatus( Cell*& ptr )
    {
        if ( ! ptr -> computeFutureStatus() )
            qCritical( qPrintable( QObject::tr( "Cannot compute new state for cell (%1,%2)" )/*.arg( i ).arg( j )*/ ) );
    }


    void evolveCell( Cell*& ptr )
    {
        if ( ! ptr -> evolve() )
            qCritical( qPrintable( QObject::tr( "Cannot evolve to new state for cell (%1,%2)" )/*.arg( i ).arg( j )*/ ) );
    }
}
